import { BaseCsv } from "./BaseCsv"

export class common extends BaseCsv{
	public readonly typeStr = {ID:"number",value:"string"}
	public static readonly excelname = "common"
	/**
	* ID
	*/
	public ID:number
	/**
	* 常量值
	*/
	public value:string
}
export class moodStickers extends BaseCsv{
	public readonly typeStr = {ItemID:"number",name:"string"}
	public static readonly excelname = "moodStickers"
	/**
	* 资源编号
	*/
	public ItemID:number
	/**
	* 资源名
	*/
	public name:string
}
export class fortuneCard extends BaseCsv{
	public readonly typeStr = {cardID:"number",type:"number",cardImage:"string",flipOver:"string",cardName:"string",desc1:"string",desc2:"string",unlock:"number"}
	public static readonly excelname = "fortuneCard"
	/**
	* 运势牌id
	*/
	public cardID:number
	/**
	* 运势类型
	*/
	public type:number
	/**
	* 牌面图案
	*/
	public cardImage:string
	/**
	* 牌面翻转
	*/
	public flipOver:string
	/**
	* 牌面名称
	*/
	public cardName:string
	/**
	* 解析描述1
	*/
	public desc1:string
	/**
	* 解析描述2
	*/
	public desc2:string
	/**
	* 图鉴解锁
	*/
	public unlock:number
}
export class findDifference extends BaseCsv{
	public readonly typeStr = {ItemID:"number",name:"string",icon:"string",pointPosition:"string",time:"number"}
	public static readonly excelname = "findDifference"
	/**
	* 关卡ID
	*/
	public ItemID:number
	/**
	* 关卡名称
	*/
	public name:string
	/**
	* 关卡封面
	*/
	public icon:string
	/**
	* 点位(x,y,类型(0=圆 1=椭圆),半径或者是长轴,短轴)
	*/
	public pointPosition:string
	/**
	* 限定时间（s）
	*/
	public time:number
}
export class csv{
	public static common(id:number):common{
		return BaseCsv.getData<common>(common.excelname,id)
	}
	public static get common_all():Map<number, common>{
		return BaseCsv.getAllData<common>(common.excelname)
	}
	public static moodStickers(id:number):moodStickers{
		return BaseCsv.getData<moodStickers>(moodStickers.excelname,id)
	}
	public static get moodStickers_all():Map<number, moodStickers>{
		return BaseCsv.getAllData<moodStickers>(moodStickers.excelname)
	}
	public static fortuneCard(id:number):fortuneCard{
		return BaseCsv.getData<fortuneCard>(fortuneCard.excelname,id)
	}
	public static get fortuneCard_all():Map<number, fortuneCard>{
		return BaseCsv.getAllData<fortuneCard>(fortuneCard.excelname)
	}
	public static findDifference(id:number):findDifference{
		return BaseCsv.getData<findDifference>(findDifference.excelname,id)
	}
	public static get findDifference_all():Map<number, findDifference>{
		return BaseCsv.getAllData<findDifference>(findDifference.excelname)
	}
	public static loadConfig<T>(name: string, asset: T) {
		switch (name) {
			case "common":BaseCsv.loadData<common,T>(name,asset, common); break;
			case "moodStickers":BaseCsv.loadData<moodStickers,T>(name,asset, moodStickers); break;
			case "fortuneCard":BaseCsv.loadData<fortuneCard,T>(name,asset, fortuneCard); break;
			case "findDifference":BaseCsv.loadData<findDifference,T>(name,asset, findDifference); break;
		}
	}
	public static readonly allFiles = ["common","moodStickers","fortuneCard","findDifference"]
}